from google.appengine.ext import db


class PhoneType(db.Model):
    code = db.StringProperty('Phone Type Code',required= True)
    description = db.StringProperty()
    created_on = db.DateTimeProperty(auto_now_add = 1)
    created_by = db.UserProperty()
    
    def __str__(self):
        return '%s'-'%s' %self.code %self.description
    
    def get_delete_url(self):
        return '/account/delete/%s/' % self.key()
    
    def get_edit_url(self):
        return '/account/edit/%s/' % self.key()